package com.qd.common.panda.domain.entity.record;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 开票记录
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class UserBillRecordsDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "记录ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "记录ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String logId;
    /**
     * 发票抬头
     */
    @Size(max = 100, message = "发票抬头长度不能超过{max}位", groups = DefaultGroup.class)
    private String title;
    /**
     * 税号
     */
    @Size(max = 50, message = "税号长度不能超过{max}位", groups = DefaultGroup.class)
    private String dutyParagraph;
    /**
     * 发票内容
     */
    @Size(max = 200, message = "发票内容长度不能超过{max}位", groups = DefaultGroup.class)
    private String note;
    /**
     * 发票金额
     */
    private BigDecimal amount;
    /**
     * 更多信息
     */
    @Size(max = 200, message = "更多信息长度不能超过{max}位", groups = DefaultGroup.class)
    private String moreMsg;
    /**
     * 收件人
     */
    @NotBlank(message = "收件人不能为空", groups = DefaultGroup.class)
    @Size(max = 100, message = "收件人长度不能超过{max}位", groups = DefaultGroup.class)
    private String userName;
    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码不能为空", groups = DefaultGroup.class)
    @Size(max = 20, message = "手机号码长度不能超过{max}位", groups = DefaultGroup.class)
    private String mobile;
    /**
     * 邮箱地址
     */
    @Size(max = 50, message = "邮箱地址长度不能超过{max}位", groups = DefaultGroup.class)
    private String email;
    /**
     * 申请时间
     */
    private LocalDateTime addTime;
    /**
     * 处理时间
     */
    private LocalDateTime processTime;
    /**
     * 状态:0申请 1处理
     */
    @NotNull(message = "状态:0申请 1处理不能为空", groups = DefaultGroup.class)
    private Integer status;
    /**
     * 状态显示
     */
    private String statusDisplay;
    /**
     * 行程数量
     */
    private Integer strokeNumber;
    /**
     * 用户ID
     */
    @NotBlank(message = "用户ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "用户ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String userId;
    /**
     * 处理人
     */
    @Size(max = 50, message = "处理人长度不能超过{max}位", groups = DefaultGroup.class)
    private String handlePersonId;
    /**
     * 处理人单位
     */
    @Size(max = 50, message = "处理人单位长度不能超过{max}位", groups = DefaultGroup.class)
    private String handleOrgId;
    /**
     * 抬头类型
     */
    private String typeHeader;
    /**
     * 抬头显示
     */
    private String typeHeaderDisplay;

    @Override
    public void freeData() {
        this.logId = null;
        this.title = null;
        this.dutyParagraph = null;
        this.note = null;
        this.amount = null;
        this.moreMsg = null;
        this.userName = null;
        this.mobile = null;
        this.email = null;
        this.addTime = null;
        this.processTime = null;
        this.status = null;
        this.statusDisplay = null;
        this.strokeNumber = null;
        this.userId = null;
        this.handlePersonId = null;
        this.handleOrgId = null;
        this.typeHeader = null;
        this.typeHeaderDisplay = null;
        super.freeData();
    }
}
